﻿#ifndef SYNCCONTRLLER_H
#define SYNCCONTRLLER_H

#include <QObject>
#include "dbtools.h"
#include <QNetworkReply>

class SyncContrller : public QObject
{
    Q_OBJECT
private:
    Dbtools *dbtools;
public:
    SyncContrller();
    ~SyncContrller();
    static SyncContrller *getInstance();
    void syncAllTypeData();
    void syncAllItemData();
    void setDBtool(Dbtools*);

signals:
    void syncAllTypeDataSuccess();
    void syncAllItemDataSuccess();
    void syncAllTypeDataFail(QString);
    void syncAllItemDataFail(QString);

public slots:
    void syncAllTypeDataRequestFinished(QNetworkReply*);
    void syncAllItemDataRequestFinished(QNetworkReply*);
};

#endif // SYNCCONTRLLER_H
